home *** CD-ROM | disk | FTP | other *** search
-
- STRPLINE
- Version 1.12
- Copyright (c) Bob Swift, 1988-1993. All Rights Reserved.
- Compiled with the Borland C++ compiler.
-
- This program is designed to read an input text file and strip out all
- lines beginning with one of a series of patterns given in a configuration
- file. The configuration file is a simple text file with each match
- pattern on a separate line. Any line in the configuration file that
- begins with a caret (^) is considered to be a comment line and will not
- be processed. The program creates a backup file called filename.BAK
- prior to beginning the stripping operation. This file is left upon
- completion of the program.
-
- The format for using this program is as follows:
-
-
- STRPLINE <filename> [configfile]
-
- where <filename> is the name of the text file to be stripped
- [configfile] is the file containing the patters to match
- default is STRPLINE.CFG in the current directory
-
-
- The text file to be stripped must be in the current directory. The
- configuration may be specified with a full drive and path. If the
- configuration file is not specified, it will default to STRPLINE.CFG
- in the current directory. You are allowed a maximum of 256 search
- patterns of 40 characters maximum.
-
- The program will display a VERY brief set of instructions if it is called
- without any arguments or if it encounters an error. The following is a
- list of the error codes returned by the program:
-
- 0 - No errors. Normal termination.
- 1 - Missing or extra command line arguments.
- 2 - Unable to open the input file.
- 3 - Unable to open the output file.
- 4 - Problem writing to output file.
- 5 - Problem closing input file.
- 6 - Problem closing output file.
- 7 - Input file not in current directory.
- 8 - Unable to open configuration file.
- 9 - Problem closing configuration file.
- 10 - No patterns in configuration file to strip.
- 11 - Unable to open backup file.
-
- When an error is encountered, the program will exit immediately and will
- attempt to properly close all files.
-
- Although I have chosen to retain all rights to this program, you are free
- to use it under the following conditions:
-
- - You realize that there is NO Warrantee of any sort.
- It was tested pretty thoroughly here before release
- but who knows what bugs may be lurking within.
-
- - You will not modify the code and release a new version
- of the program. I welcome suggestions for improvement
- (especially when accompanied by code) but I make no
- guarantee of future releases.
-
- - If you find the program useful, I ask that you do
- something to brighten somebody else's day. Just
- exactly what, I will leave up to you.
-
-
- You may freely distribute this program provided that you distribute only
- the complete archive which includes the STRPLINE.EXE, STRPLINE.C,
- STRPLINE.CFG and STRPLINE.DOC. In addition, You MUST NOT charge for the
- program nor can you charge a copy fee over $4.00 (including the price of
- the diskette).
-
-
- Bob Swift (1:342/5)
-
-
- Revision History
- ----------------
-
- 1.01 - 88/07/01 - Original release version.
-
- 1.01 - 88/07/03 - Modified to output instructions, line counts, and
- error messages to the console only (no redirection).
-
- 1.02 - 88/07/12 - Changed output method to allow redirection and to
- avoid problem of "bleed through" when using multi-
- tasking software like DoubleDOS. Increased maximum
- number of search lines from 10 to 20.
-
- 1.03 - 88/07/13 - Modified to display the search patterns used.
-
- 1.10 - 89/01/05 - Modified to allow stripping of blank lines. This is
- accomplished by entering a blank line (no spaces) in
- the configuration file. In previous versions, a blank
- line was ignored. Updated to Turbo C 2.00.
-
- 1.11 - 90/01/22 - Number of search patterns increased to 256. Upgraded
- to Turbo C++ 1.00.
-
- 1.12 - 93/09/12 - Updated Fidonet address in documentation.
-
-
-